<!-- MAIN -->
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" ng-init="init()">
    <h1 class="page-header">订单管理界面</h1><span ng-if="hasNewOrder">您有<span>{{ newOrder }}</span>个新订单，请及时处理</span>
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th ng-click="orderByX('_id')">订单号</th>
                    <th>顾客名称</th>
                    <th>收货地址</th>
                    <th>菜品</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="order in orders | orderBy:orderBy | filter:search">
                    <td>{{order._id}}</td>
                    <!--<td>{{order.merchant}}</td>-->
                    <td>{{order.customer.username}}</td>
                    <td>
                        <dl>
                            <dt>联系人：
                                <dd>{{order.address.contactPerson}}</dd>
                            </dt>
                            <dt>电话：
                                <dd>{{order.address.contactTel}}</dd>
                            </dt>
                            <dt>收货地址：
                                <dd>{{order.address.contactAddressName}}</dd>
                            </dt>
                        </dl>
                    </td>
                    <td>
                        <dl ng-repeat="food in order.orderFoods">
                            <dt>{{food.foodName}} :
                                <dd>{{food.foodPrice}} * {{food.foodCount}} = {{food.foodPrice * food.foodCount}}</dd>
                            </dt>
                        </dl>
                    </td>
                </tr>
            </tbody>
        </table>
        <h4>{{ws.data.msg}}</h4> 
        <button class="btn btn-primary" ng-click="reflash()">刷新</button>
    </div>

    <!--<div class="table-responsive">
        <h2 class="page-header">Test Websocket</h2>
        <h4>{{ws.data.msg}}</h4> 
        <button class="btn btn-primary" ng-click="reflash()">刷新</button>
    </div>-->
</div>
<!-- END MAIN -->